package com.nf.action;


import com.fasterxml.jackson.databind.ObjectMapper;
import entify.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//新内容八月二十九
@Controller
public class Textaction {

    @RequestMapping("/SASA.action")
    public String aaaa(){
        return "AAA";
    }

    @ResponseBody//若是存在，则返回的是值无法放回.JSP
    @RequestMapping("/ASASAS")
    public Student aaa(){

        Student s = new Student();
        s.setName("xiaoming");//写一个json的名字
       s.setAge(17);
        s.setID(332);


        return s;  //返回的是刚刚所创建的学生 s

    }
}
